package net.lainiao.morethread.Chapter1.demo1;

/**
 * Created by Administrator on 2017/2/27.
 */
public class Demo1 {
    public static void main(String[] args) {
        System.out.println(Thread.currentThread().getName());
        for (int i = 0; i <10 ; i++) {
            new Thread("thread-"+i){
                @Override
                public void run() {
                    System.out.println("Thead Name:"+getName());
                }
            }.start();
        }
    }
}
